<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
  <title>Loader example -- double underscore</title>
  <link rel="stylesheet" type="text/css" href="../example.css" />
</head>
<body>
<div id="doc4">
  <div class="hd">
    <div class="logo" style="float:left;"><a href="http://code.google.com/p/double-underscore/" target="_blank"><img src="http://stauren.net/misc/images/bullhead.gif" /></a></div>
    <div class="hd-title">du loader example</div>
    <div>
      <a href="http://code.google.com/p/double-underscore/">Project home</a>&nbsp;
      <a href="http://code.google.com/p/double-underscore/w/list">More docs </a>
    </div>
  </div>

  <div class="hd">
    <h1>Code</h1>
<pre>
&lt;script src="http://double-underscore.googlecode.com/svn/trunk/src/loader/loader.js"&gt;&lt;/script&gt;
//NOTICE: loader.js in trunk is not stable, should always use the newest loader in pkgs
&lt;script&gt;
__.load('url or module name', function() {
  //onload callback
});
&lt;/script&gt;
</pre>
  <h1>Methods and Properties</h1>
  <ul id="result-ctn" style="margin-left:10px;"></ul>
  <h1>Loading modules and js,css files</h1>
<pre>
__.load('./test.js core', function() {
  if ('core' in __.config.loadedMods) {
    dolog('module core is loaded');
  }

  dolog('onload callback is executed');
});
</pre>
  <ul id="result-ctn2" style="margin-left:10px;"></ul>
  </div>
</div>
<script src="../example.js"></script>
<script src="http://double-underscore.googlecode.com/svn/trunk/src/loader/loader.js"></script>
<script>
(function() {
  for (var i in __) {
    dolog('typeof __.'+i+' is '+ typeof __[i]);
  }
}());

__.load('./test.js core', function() {
  if ('core' in __.config.loadedMods) {
    dolog('module core is loaded');
  }

  dolog('onload callback is executed');
});
</script>
</body>
</html>
